function [y] = cost_function(x, nextEstimatedWorkload, ...
    cost_per_request)

% LOW PERFORMANCES
% y = cost_per_request * max(nextEstimatedWorkload(x) - ...
%     next_already_paid_requests', 0);

pars = num2cell(x);
y = cost_per_request * nextEstimatedWorkload(pars{:})';


end
